/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package alcatelparser.tags;

import alcatelparser.modules.Env;
import alcatelparser.modules.I;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 *
 * @author geniuz
 */
public class TagProperties
{

    private TagProperties()
    {
        loadTagProperties();
    }

    private void loadTagProperties()
    {
        _props = new Properties();
        try
        {
            _props.load(new FileInputStream(new File((new StringBuilder()).append(Env.getEnv().getRunDir()).append(File.separator).append(I.I(404)).toString())));
        }
        catch(IOException ioexception)
        {
            //throw new ApplicationInitalyzeError(I.I(415));
        }
    }

    public static final TagProperties getTagProperties()
    {
        if(_tProps == null)
            try
            {
                _tProps = new TagProperties();
            }
            catch(Exception applicationinitalyzeerror)
            {
                System.out.println(I.I(354));
            }
        return _tProps;
    }

    public static final void initialyze()
    {
        _tProps = new TagProperties();
    }

    public final String getProperty(String s)
    {
        return _props.getProperty(s);
    }

    public final String getReducedTagProperty(String s)
    {
        String s1 = _props.getProperty((new StringBuilder()).append(I.I(345)).append(s).toString());
        if(s1 == null)
            return "";
        else
            return s1;
    }

    private static final String TAG_PROPERTIES_FILE = "tags.props";
    private static final String REDUCED_TAG_PREFIX = "REDUCED_";
    private Properties _props;
    private static TagProperties _tProps;
}
